<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:pe="http://primefaces.org/ui/extensions">

<h:head>
	<link href="css/layout.css" rel="stylesheet" type="text/css" />
</h:head>

<h:body>
	<ui:debug />
	<ui:include src="menu.xhtml" />
	<div align="center">
		<h:form id="formMail" prependId="false"
			onsubmit="return ValidaSemPreenchimento(this)">
			<p:panel header="Envio de e-mail" style="width: 550px">
				<p:messages />
				<h:panelGrid columns="2">
					<h:outputText style="font-size: 14px; color: white;" value="RA: " />
					<p:inputMask mask="9999999" id="Ra" required="true"
						value="#{mailBean.mensagem.ra}" size="10" />
					<h:outputText style="font-size: 14px; color: white;" value="Nome: " />
					<p:inputText id="Nome" required="true"
						value="#{mailBean.mensagem.nome}" size="50" />
					<h:outputText style="font-size: 14px; color: white;"
						value="Disciplina: " />
					<p:inputText id="Disciplina" required="true"
						value="#{mailBean.mensagem.disciplina}" size="50" />
					<h:outputText style="font-size: 14px; color: white;"
						value="E-mail: " />
					<p:inputText id="E-mail" required="true"
						value="#{mailBean.mensagem.retorno}" size="50" >
					</p:inputText>
					<h:outputText style="font-size: 14px; color: white;"
						value="Assunto: " />
					<p:inputText id="Assunto" required="true"
						value="#{mailBean.mensagem.titulo}" size="50" />
					<h:outputText style="font-size: 14px; color: white;"
						value="Mensagem: " />
					<p:inputTextarea id="Mensagem" required="true"
						style="resize:none;width:445px"
						value="#{mailBean.mensagem.mensagem}" cols="63" rows="10" />
				</h:panelGrid>
				<pe:keyFilter for="Ra" mask="num" />
				<p:commandButton value="Enviar e-mail"
					styleClass="ui-icon-mail-closed" action="#{mailBean.enviaEmail}"
					update="@form,:formMail" />
				<p:commandButton value="Limpar Campos"
					styleClass="ui-icon-circle-close" action="#{mailBean.limpaCampos}"
					update=":formMail" />
			</p:panel>
		</h:form>
	</div>
</h:body>
</html>